Volume Profile Free MAX SLI (50 Levels Value Area VWAP) by RRBVolume Profile Free MAX SLI by RagingRocketBull 2019
Version 1.0
All available Volume Profile Free MAX SLI versions are listed below (They are very similar and I don't want to publish them as separate indicators):
ver 1.0: style columns implementation
ver 2.0: style histogram implementation 
ver 3.0: style line implementation
This indicator calculates Volume Profile for a given range and shows it as a histogram consisting of 50 horizontal bars. 
It can also show Point of Control (POC), Developing POC, Value Area/VWAP StdDev High/Low as dynamically moving levels.
Free accounts can't access Standard TradingView Volume Profile, hence this indicator. 
There are several versions: Free Pro, Free MAX SLI, Free History. This is the Free MAX SLI version. The Differences are listed below:
 - Free Pro: 25 levels, +Developing POC, Value Area/VWAP High/Low Levels, Above/Below Area Dimming
 - Free MAX SLI: 50 levels, packed to the limit, 2x SLI modes for Buy/Sell or even higher res 150 levels
 - Free History: auto highest/lowest, historic poc/va levels for each session
Features:
 - High-Res Volume Profile with up to 50 levels (3 implementations)
 - 20-30x faster than the old Pro versions especially on lower tfs with long history
 - 2x SLI modes for even higher res: 150 levels with 3x vertical SLI, 50 buy/sell levels with 2x horiz SLI
 - Calculate Volume Profile on full history
 - POC, Developing POC Levels
 - Buy/Sell/Total volume modes
 - Side Cover
 - Value Area, VAH/VAL dynamic levels
 - VWAP High/Low dynamic levels with Source, Length, StdDev as params
 - Show/Hide all levels
 - Dim Non Value Area Zones
 - Custom Range with Highlighting
 - 3 Anchor points for Volume Profile
 - Flip Levels Horizontally
 - Adjustable width, offset and spacing of levels
 - Custom Color for POC/VA/VWAP levels and Transparency for buy/sell levels
Usage:
 - specify max_level/min_level/spacing (required)
 - select range (start_bar, range length), confirm with range highlighting
 - select volume type: Buy/Sell/Total
 - select mode Value Area/VWAP to show corresponding levels
 - flip/select anchor point to position the buy/sell levels
 - use Horiz SLI mode for 50 Buy/Sell or Vertical SLI for 150 levels if needed
 - use POC/Developing POC/VA/VWAP High/Low as S/R levels. Usually daily values from 1-3 days back are used as levels for the current day.
SLI:
 - use SLI modes to extend the functionality of the indicator:
   - Horiz Buy/Sell 2x SLI lets you view 50 Buy/Sell Levels at the same time
   - Vertical Max_Vol 3x SLI lets you increase the resolution to 150 levels
   - you need at least 2 instances of the indicator attached to the same chart for SLI to work
1) Enable Horiz SLI:
   - attach 2 indicator instances to the chart
   - make sure all instances have the same min_level/max_level/range/spacing settings
   - select volume type for each instance: you can have a buy/sell or buy/total or sell/total SLI. Make sure your buy volume instance is the last attached to be displayed on top of sell/total instances without overlapping.
   - set buy_sell_sli_mode to true for indicator instances with volume_type = buy/sell, for type total this is optional.
   - this basically tells the script to calculate % lengths based on total volume instead of individual buy/sell volumes and use ext offset for sell levels
   - Sell Offset is calculated relative to Buy Offset to stack/extend sell after buy. Buy Offset = Zero - Buy Length. Sell Offset = Buy Offset - Sell Length = Zero - Buy Length - Sell Length
   - there are no master/slave instances in this mode, all indicators are equal, poc/va levels are not affected and can work independently, i.e. one instance can show va levels, another - vwap.
2) Enable Vertical SLI:
   - attach the first instance and evaluate the full range to roughly determine where is the highest max_vol/poc level i.e. 0..20000, poc is in the bottom half (third, middle etc) or
   - add more instances and split the full vertical range between them, i.e. set min_level/max_level of each corresponding instance to 0..10000, 10000..20000 etc
   - make sure all instances have the same range/spacing settings
   - an instance with a subrange containing the poc level of the full range is now your master instance (bottom half). All other instances are slaves, their levels will be calculated based on the max_vol/poc of the master instance instead of local values
   - set show_max_vol_sli to true for the master instance. for slave instances this is optional and can be used to check if master/slave max_vol values match and slave can read the master's value. This simply plots the max_vol value
   - you can also attach all instances and set show_max_vol_sli to true in all of them - the instance with the largest max_vol should become the master
  Auto/Manual Ext Max_Vol Modes:
   - for auto vertical max_vol SLI mode set max_vol_sli_src in all slave instances to the max_vol of the master indicator: "VolumeProfileFree_MAX_RRB: Max Volume for Vertical SLI Mode". It can be tricky with 2+ instances
   - in case auto SLI mode doesn't work - assign max_vol_sli_ext in all slave instances the max_vol value of the master indicator manually and repeat on each change
   - manual override max_vol_sli_ext has higher priority than auto max_vol_sli_src when both values are assigned, when they are 0 and close respectively - SLI is disabled
   - master/slave max_vol values must match on each bar at all times to maintain proper level scale, otherwise slave's levels will look larger than they should relative to the master's levels. 
   - Max_vol (red) is the last param in the long list of indicator outputs
   - the only true max_vol/poc in this SLI mode is the master's max_vol/poc. All poc/va levels in slaves will be irrelevant and are disabled automatically. Slaves can only show VWAP levels.
   - VA Levels of the master instance in this SLI mode are calculated based on the subrange, not the whole range. Cross check with the full range.
  WARNING! 
   - auto mode max_vol_sli_src is experimental and may not work as expected
   - you can only assign auto mode max_vol_sli_src = max_vol once due to some bug with unhandled exception/buffer overflow in Tradingview. Seems that you can clear the value only by removing the indicator instance
   - sometimes you may see a "study in error state" error when attempting to set it back to close. Remove indicator/Reload chart and start from scratch
   - volume profile may not finish to redraw and freeze in an ugly shape after an UI parameter change when max_vol_sli_src is assigned a max_vol value. Assign it to close - VP should redraw properly, but it may not clear the assigned max_vol value
   - you can't seem to be able to assign a proper auto max_vol value to the 3rd slave instance
   - 2x Vertical SLI works and tested in both auto/manual, 3x SLI - only manual seems to work
Notes:
 - This code is 20x-30x faster (main for cycle is removed) especially on lower tfs with long history - only 2-3 sec load/redraw time vs 30-60 sec of the old Pro versions
 - Instead of repeatedly calculating the total sum of volumes for the whole range on each bar, vol sums are now increased on each bar and passed to the next in the range making it a per range vs per bar calculation that reduces time dramatically
 - hist_base for levels still results is ugly redraw
 - if you don't see a volume profile check range settings: min_level/max_level and spacing, set spacing to 0 (or adjust accordingly based on the symbol's precision, i.e. 0.00001)
 - you can view either of Buy/Sell/Total volumes, but you can't display Buy/Sell levels at the same time using a single instance (this would 2x reduce the number of levels). Use 2 indicator instances in horiz buy/sell sli mode for that.
 - Volume Profile/Value Area are calculated for a given range and updated on each bar. Each level has a fixed length. Offsets control visible level parts. Side Cover hides the invisible parts.
 - Custom Color for POC/VA/VWAP levels - UI Style color/transparency can only change shape's color and doesn't affect textcolor, hence this additional option
 - Custom Width - UI Style supports only width <= 4, hence this additional option
 - POC is visible in both modes. In VWAP mode Developing POC becomes VWAP, VA High and Low => VWAP High and Low correspondingly to minimize the number of plot outputs
 - You can't change buy/sell level colors from input (only plot transparency) - this requires 2x plot outputs => 2x reduces the number of levels to fit the max 64 limit. That's why 2 additional plots are used to dim the non Value Area zones
 - All buy/sell volume lengths are calculated as % of a fixed base width = 100 bars (100%). You can't set show_last from input to change it
 - There's no such thing as buy/sell volume, there's just volume, but for the purposes of the Volume Profile method, assume: bull candle = buy volume, bear candle = sell volume
P.S. Gravitonium Levels Are Increasing. Unobtainium is nowhere to be found!
Links on Volume Profile and Value Area calculation and usage:
www.tradingview.com
stockcharts.com
onlinelibrary.wiley.com
Cari dalam skrip untuk "high low"
Volume Profile Free Pro (25 Levels Value Area VWAP) by RRBVolume Profile Free Pro by RagingRocketBull 2019
Version 1.0
All available Volume Profile Free Pro versions are listed below (They are very similar and I don't want to publish them as separate indicators):
ver 1.0: style columns implementation
ver 2.0: style histogram implementation
ver 3.0: style line implementation
This indicator calculates Volume Profile for a given range and shows it as a histogram consisting of 25 horizontal bars. 
It can also show Point of Control (POC), Developing POC, Value Area/VWAP StdDev High/Low as dynamically moving levels.
Free accounts can't access Standard TradingView Volume Profile, hence this indicator. 
There are 3 basic methods to calculate the Value Area for a session.
 - original method developed by Steidlmayr (calculated around POC)
 - classical method using StdDev (calculated around the mean VWAP)
 - another method based on the mean absolute deviation (calculated around the median)
POC is a high volume node and can be used as support/resistance. But when far from the day's average price it may not be as good a trend filter as the other methods.
The 80% Rule: When the market opens above/below the Value Area and then returns/stays back inside for 2 consecutive 30min periods it has 80% chance of filling VA (like a gap).
There are several versions: Free, Free Pro, Free MAX. This is the Free Pro version. The Differences are listed below:
 - Free: 30 levels, Buy/Sell/Total Volume Profile views, POC
 - Free Pro: 25 levels, +Developing POC, Value Area/VWAP High/Low Levels, Above/Below Area Dimming
 - Free MAX: 50 levels, packed to the limit
Features:
 - Volume Profile with up to 25 levels (3 implementations)
 - POC, Developing POC Levels
 - Buy/Sell/Total/Side by Side View modes
 - Side Cover
 - Value Area, VAH/VAL dynamic levels
 - VWAP High/Low dynamic levels with Source, Length, StdDev as params
 - Show/Hide all levels
 - Dim Non Value Area Zones
 - Custom Range with Highlighting
 - 3 Anchor points for Volume Profile
 - Flip Levels Horizontally
 - Adjustable width, offset and spacing of levels
 - Custom Color for POC/VA/VWAP levels and Transparency for buy/sell levels
Usage:
 - specify max_level/min_level for a range (required in ver 1.0/2.0, auto/optional in ver 3.0 = set to highest/lowest)
 - select range (start_bar, range length), confirm with range highlighting
 - select mode Value Area or VWAP to show corresponding levels.
 - flip/select anchor point to position the buy/sell levels, adjust width and spacing as needed
 - select Buy/Sell/Total/Side by Side view mode
 - use POC/Developing POC/VA/VWAP High/Low as S/R levels. Usually daily values from 1-3 days back are used as levels for the current day.
 - Green - buy volume of a specific price level in a range, Red - sell volume. Green + Red = Total volume of a price level in a range
There's no native support for vertical histograms in Pinescript (with price axis as base)
Basically, there are 4 ways to plot a series of horizontal bars stacked on top of each other:
1. plotshape style labeldown (ver 0 prototype discarded)
      - you can have a set of fixed width/height text labels consisting of a series of underscores and moving dynamically as levels. Level offset controls visible length.
      - you can move levels and scale the base width of the volume profile histogram dynamically
      - you can calculate the highest/lowest range values automatically. max_level/min_level inputs are optional
      - you can't fill the gaps between levels/adjust/extend width, height - this results in a half baked volume profile and looks ugly
      - fixed text level height doesn't adjust and looks bad on a log scale
      - fixed font width also doesn't scale and can't be properly aligned with bars when zooming
2. plot style columns + hist_base (ver 1.0)
      - you can plot long horizontal bars using a series of small adjacent vertical columns with level offsets controlling visible length.
      - you can't hide/move levels of the volume profile histogram dynamically on each bar, they must be plotted at all times regardless - you can't delete the history of a plot.
      - you can't scale the base width of the volume profile histogram dynamically, can't set show_last from input, must use a preset fixed width for each level
      - hist_base can only be a static const expression, can't be assigned highest/lowest range values automatically - you have to specify max_level/min_level manually from input
      - you can't control spacing between columns - there's an equalizer bar effect when you zoom in, and solid bars when you zoom out
      - using hist_base for levels results in ugly load/redraw times - give it 3-5 sec to finalize its shape after each UI param change
      - level top can be properly aligned with another level's bottom producing a clean good looking histogram
      - columns are properly aligned with bars automatically
3. plot style histogram + hist_base (ver 2.0)
      - you can plot long horizontal bars using a series of small vertical bars (horizontal histogram) instead of columns.
      - you can control the width of each histogram bar comprising a level (spacing/horiz density). Large enough width will cause bar overlapping and give level a "solid" look regardless of zoom
      - you can only set width <= 4 in UI Style - custom textbox input is provided for larger values. You can set width and plot transparency from input
      - this method still uses hist_base and inherits other limitations of ver 2.0
4. plot style lines (ver 3.0)
      - you can also plot long horizontal bars using lines with level offsets controlling visible length.
      - lines don't need hist_base - fast and smooth redraw times
      - you can calculate the highest/lowest range values automatically. max_level/min_level inputs are optional
      - level top can't be properly aligned with another level's bottom and have a proper spacing because line width uses its own units and doesn't scale
      - fixed line width of a level (vertical thickness) doesn't scale and looks bad on log (level overlapping)
      - you can only set width <= 4 in UI Style, a custom textbox input is provided for larger values. You can set width and plot transparency from input
Notes:
 - hist_base for levels results in ugly load/redraw times - give it 3-5 sec to finalize its shape after each UI param change
 - indicator is slow on TFs with long history 10000+ bars
 - Volume Profile/Value Area are calculated for a given range and updated on each bar. Each level has a fixed width. Offsets control visible level parts. Side Cover hides the invisible parts.
 - Custom Color for POC/VA/VWAP levels - UI Style color/transparency can only change shape's color and doesn't affect textcolor, hence this additional option
 - Custom Widh for levels - UI Style supports only width <= 4, hence this additional option
 - POC is visible in both modes. In VWAP mode Developing POC becomes VWAP, VA High and Low => VWAP High and Low correspondingly to minimize the number of plot outputs
 - You can't change buy/sell level colors (only plot transparency) - this requires 2x plot outputs exceeding max 64 limit. That's why 2 additional plots are used to dim the non Value Area zones
 - Use Side by Side view to compare buy and sell volumes between each other: base width = max(total_buy_vol, total_sell_vol)
 - All buy/sell volume lengths are calculated as % of a fixed base width = 100 bars (100%). You can't set show_last from input
 - Sell Offset is calculated relative to Buy Offset to stack/extend sell on top of buy. Buy Offset = Zero - Buy Length. Sell Offset = Buy Offset - Sell Length = Zero - Buy Length - Sell Length
 - If you see "loop too long error" - change some values in UI and it will recalculate - no need to refresh the chart
 - There's no such thing as buy/sell volume, there's just volume, but for the purposes of the Volume Profile method, assume: bull candle = buy volume, bear candle = sell volume
 - Volume Profile Range is limited to 5000 bars for free accounts
P.S. Cantaloupia Will be Free!
Links on Volume Profile and Value Area calculation and usage:
www.tradingview.com
stockcharts.com
onlinelibrary.wiley.com
PPSRMA -COMPILATION OF 2 GREAT SCRIPTS AND DOUBLE MAFirst of all I just did the compilation so  this is not my  idea, it is just a miscellany.  
This script has been compiled for authors who have just been introduced to scripts  : for unloading and leaving room for other indicators especially:non-pro users needs space for indicators and users  seeking best technical combination. This script says thousands of comments. 
It's the best combination I've ever try and see everything about future.  All efforts belongs to ChrisMoody. 
( And fernandofurtado for double moving average codes)             
--------------- INGREDIENTS  ------------------  
1-) Price Action Bars - Price Patterns - CM_Price-Action-Bars-Price Patterns That Work!   ( by ChrisMoody )  
Original :  
2-) Oldschool Projected High & Lows - CM_OldSchool_Projected_high_Low                     (  by ChrisMoody )
Original : 
3-)  Multiple Moving Averages -                                                                                     (  by fernandofurtado )
Original :     
----------  SETTINGS- -----------
 
- Use dark theme 
- Select SMA fast : 25   SMA slow : 50  ( Inputs)
- Tick all inputs and see price action bars  ( Inputs)
    FOR FLOW TRADERS :   
**  Use 30 mins graphs with -  Weekly Projected High & Lows      
*** Choose high liquidity stocks ( Bank stocks etc.)
   FOR MEDIUM - LONG TERM TRADERS AND INVESTORS    
**  Use 4 hour graphs with -   Quarterly Projected High & Lows         OR 
**   1 day graphs with - Yearly Projected High &Lows   ( OR Quarterly Projected High & Lows )
    -------------------  SUGGESTIONS --------------------
* Add MACD (12,26)  and RSI (14)  in your empty slots.   
* Use mostly on stock markets.
* Be careful about stocks under red breakout line are dangerous same as above green breakout levels. 
* Always consider with all indicators and patterns (especially price patterns), get confirmed from Volume. 
* Consider with financial analysis ( mostly for medium-long term ) 
 NOTE :  The authors' codes are specified  on scripts  source codes. 
PivotBoss Outside Reversal SetupPATTERN SUMMARY
1. The engulfing bar of a bullish outside reversal setup has a low that is below the prior bar's low (L < L ) and a
close that is above the prior bar's high (C > H ).
2. The engulfing bar of a bearish outside reversal setup has a high that is above the prior bar's high (H > H )
and a close that is below the prior bar's low (C < L ).
3. The engulfing bar is usually 5 to 25 percent larger than the size of the average bar in the lookback period.
PATTERN PSYCHOLOGY
The power behind this pattern lies in the psychology behind the traders involved in this setup. If you have
ever participated in a breakout at support or resistance only to have the market reverse sharply against you, then
you are familiar with the market dynamics of this setup. What exactly is going on at these levels? To understand
this concept is to understand the outside reversal pattern. Basically, market participants are testing the waters
above resistance or below support to make sure there is no new business to be done at these levels. When no
initiative buyers or sellers participate in range extension, responsive participants have all the information they
need to reverse price back toward a new area of perceived value.
As you look at a bullish outside reversal pattern, you will notice that the current bar's low is lower than the
prior bar's low. Essentially, the market is testing the waters below recently established lows to see if a downside
follow-through will occur. When no additional selling pressure enters the market, the result is a flood of buying
pressure that causes a springboard effect, thereby shooting price above the prior bar's highs and creating the 
beginning of a bullish advance.
If you recall the child on the trampoline for a moment, you'll realize that the child had to force the bounce
mat down before he could spring into the air. Also, remember Jennifer the cake baker? She initially pushed price
to $20 per cake, which sent a flood of orders into her shop. The flood of buying pressure eventually sent the price
of her cakes to $35 apiece. Basically, price had to test the $20 level before it could rise to $35.
Let's analyze the outside reversal setup in a different light for a moment. One of the reasons I like this setup
is because the two-bar pattern reduces into the wick reversal setup, which we covered earlier in the chapter. If
you are not familiar with candlestick reduction, the idea is simple. You are taking the price data over two or more
candlesticks and combining them to create a single candlestick. Therefore, you will be taking the open, high, low,
and close prices of the bars in question to create a single composite candlestick.
Take a look at Figure 2.13, which illustrates the candlestick reduction of the outside reversal setup.
Essentially, taking the highest high and the lowest low over the two-bar period gives you the range of the
composite candlestick. Then, taking the opening price of the first candle and the closing price of the last candle
will finish off the composite candlestick. Depending on the structure of the bars of the outside reversal setup, the
result of the candlestick reduction will usually be the transformation into a wick reversal setup, which we know to
be quite powerful. Therefore, in many cases the physiology of the outside reversal pattern basically demonstrates
the inherent psychological traits of the wick reversal pattern. This is just another level of analysis that reinforces
my belief in the outside reversal setup.
Balanced Delta Volume Profile (Zeiierman)█  Overview 
 Balanced Delta Volume Profile (Zeiierman)  builds a vertical, price-by-price profile that blends total participation with balance quality. Instead of plotting raw volume alone, it weights each price bin by: 
 
 how balanced buyers vs. sellers were, 
 how compressed price was inside that bin, 
 how often price revisited it. 
 
The result spotlights fair value and acceptance zones while still revealing momentum/imbalance areas—ideal for reading rotation vs. trend, continuation vs. exhaustion, and the prices that truly matter.
   
 Highlights 
 
 Balanced score that fuses delta symmetry, price compression, and hit frequency.
 Optional heat spectrum for instant read of participation density and balance strength.
 POC-like auto highlight of the dominant price level within the lookback window.
 Works across timeframes for session profiling, swing context, or regime shifts.
 
█  How It Works 
 ⚪ Profile Construction 
The script scans a fixed History Length and divides the full high–low span into Bin Count price bins. For every bar in the window, its volume is proportionally distributed across the bins it overlaps, so wide-range bars contribute across multiple bins, while narrow bars concentrate where they traded most. This yields per-bin totals for:
 
 Total Volume (participation)
 Positive / Negative Volume (up vs. down bar contribution)
 Hit Count (how often price touched the bin)
 Average Price Range (mean bar range inside the bin; a proxy for compression)
 
⚪ Delta & Direction 
For each bin, delta symmetry is measured via the ratio of |pos − neg| to total volume. Bins with balanced two-sided flow score higher than one-sided, runaway bins. This curbs the tendency of raw volume profiles to over-reward impulsive bursts.
⚪ Balance Score 
Each price bin gets a balance score that multiplies three normalized components:
 
 Delta Balance:   rewards bins where buy/sell pressure is symmetrical (configurable via Volume Momentum Weight).
 Price Compression:  rewards bins where average bar range is relatively small (configurable via Price Momentum Weight).
 Durability:  rewards bins revisited often (configurable via Hits Weight).
 
A Min Hits Filter removes flimsy, single-touch bins from dominating the score. The profile can display pure totals or Average Mode (Vol/Hit) to compare bins fairly when hit counts differ.
⚪ Display & Heat Spectrum 
The final plotted bar length per bin is the display volume (total or average) weighted by the balance score and normalized to 100.
 
 POC-like Highlight:  The 100% bin is outlined (and labeled) when Highlight Max Volume Bin is ON.
 Heat Spectrum (optional):  A background gradient scales with normalized bar length and balance hue.
 Balance Hue:  Interpolates between Balance Low/High Colors so high-balance bins visually pop as “accepted value.”
 
█  How to Use 
The profile is effectively a map of price acceptance:
 
 High, bright bars  = strong participation at balanced prices → fair value/rotation zones.
 Thin, muted bars  = poor acceptance → imbalance or transition areas.
 POC-style level  = most influential price in the lookback window.
 
⚪ Find Fair Value & Acceptance 
Thick, high-balance bins mark value. Expect rotation: price often revisits or oscillates around these areas. They’re prime zones for mean-reversion fades, scale-ins, and risk-defined trades against the edges.
  
⚪ Identify Imbalance & Funnels 
Low-balance, low-hit bins often act like air pockets—price can move through them quickly. These zones are helpful for continuation trades into thin areas or for timing breakout pulls back into acceptance.
  
 
⚪ POC Dynamics 
When price leaves the POC and returns, watch for re-acceptance (price comes back into the POC or high-balance zone and stays there.) vs. rejection (trend continuation away from value). The auto-highlight makes this quick to judge.
   
█  Settings 
 
 History Length –  Bars scanned for the profile. Longer = broader context, slower to adapt.
 Bin Count –  Vertical resolution of bins between the window’s min and max price.
 Display Shift –  Offsets the rendering rightward for clarity.
 Average Mode (Vol/Hit) –  ON uses average volume per visit; OFF uses total volume.
 Volume Momentum Weight –  Emphasizes two-way flow; higher values favor balanced bins over one-sided deltas.
 Price Momentum Weight –  Emphasizes compression; higher values favor narrow-range, coiling price action.
 Hits Weight –  Rewards bins revisited often; higher values favor durable acceptance.
 Min Hits Filter –  Minimum visits a bin needs to qualify for the balance score.
 Show Heat Spectrum –  Background gradient for quick read of density and balance.
 Highlight Max Volume Bin –  Outline + raw volume label for the dominant bin.
 Max Volume Color –  Color used for that highlight.
 Balance Low/High Colors –  Gradient endpoints for balance hue across the profile.
 
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
FVG MagicFVG Magic — Fair Value Gaps with Smart Mitigation, Inversion & Auto-Clean-up
FVG Magic finds every tradable Fair Value Gap (FVG), shows who powered it, and then manages each gap intelligently as price interacts with it—so your chart stays actionable and clean.
Attribution
This tool is inspired by the idea popularized in “Volumatic Fair Value Gaps  ” by BigBeluga (licensed CC BY-NC-SA 4.0). Credit to BigBeluga for advancing FVG visualization in the community.
Important: This is a from-scratch implementation—no code was copied from the original. I expanded the concept substantially with a different detection stack, a gap state machine (ACTIVE → 50% SQ → MITIGATED → INVERSED), auto-clean up rules, lookback/nearest-per-side pruning, zoom-proof volume meters, and timeframe auto-tuning for 15m/H1/H4.
What makes this version more accurate
Full-coverage detection (no “missed” gaps)
Default ICT-minimal rule (Bullish: low > high , Bearish: high < low ) catches all valid 3-candle FVGs.
Optional Strict filter (stricter structure checks) for traders who prefer only “clean” gaps.
Optional size percentile filter—off by default so nothing is hidden unless you choose to filter.
Correct handling of confirmations (wick vs close)
Mitigation Source is user-selectable: high/low (wick-based) or close (strict).
This avoids false “misses” when you expect wick confirmations (50% or full fill) but your logic required closes.
State-aware labelling to prevent misleading data
The Bull%/Bear% meter is shown only while a gap is ACTIVE.
As soon as a gap is 50% SQ, MITIGATED, or INVERSED, the meter is hidden and replaced with a clear tag—so you never read stale participation stats.
Robust zoom behaviour
The meter uses a fixed bar-width (not pixels), so it stays proportional and readable at any zoom level.
Deterministic lifecycle (no stale boxes)
Remove on 50% SQ (instant or delayed).
Inversion window after first entry: if price enters but doesn’t invert within N bars, the box auto-removes once fully filled.
Inversion clean up: after a confirmed flip, keep for N bars (context) then delete (or 0 = immediate).
Result: charts auto-maintain themselves and never “lie” about relevance.
Clarity near current price
Nearest-per-side (keep N closest bullish & bearish gaps by distance to the midpoint) focuses attention where it matters without altering detection accuracy.
Lookback (bars) ensures reproducible behaviour across accounts with different data history.
Timeframe-aware defaults
Sensible auto-tuning for 15m / H1 / H4 (right-extension length, meter width, inversion windows, clean up bars) to reduce setup friction and improve consistency.
What it does (under the hood)
Detects FVGs using ICT-minimal (default) or a stricter rule.
Samples volume from a 10× lower timeframe to split participation into Bull % / Bear % (sum = 100%).
Manages each gap through a state machine:
ACTIVE → 50% SQ (midline) → MITIGATED (full) → INVERSED (SR flip after fill).
Auto-clean up keeps only relevant levels, per your rules.
Dashboard (top-right) displays counts by side and the active state tags.
How to use it
First run (show everything)
Use Strict FVG Filter: OFF
Enable Size Filter (percentile): OFF
Mitigation Source: high/low (wick-based) or close (stricter), as you prefer.
Remove on 50% SQ: ON, Delay: 0
Read the context
While ACTIVE, use the Bull%/Bear% meter to gauge demand/supply behind the impulse that created the gap.
Confluence with your HTF structure, sessions, VWAP, OB/FVG, RSI/MACD, etc.
Trade interactions
50% SQ: often the highest-quality interaction; if removal is ON, the box clears = “job done.”
Full mitigation then rejection through the other side → tag changes to INVERSED (acts like SR). Keep for N bars, then auto-remove.
Keep the chart tidy (optional)
If too busy, enable Size Filter or set Nearest per side to 2–4.
Use Lookback (bars) to make behaviour consistent across symbols and histories.
Inputs (key ones)
Use Strict FVG Filter: OFF(default)/ON
Enable Size Filter (percentile): OFF(default)/ON + threshold
Mitigation Source: high/low or close
Remove on 50% SQ + Delay
Inversion window after entry (bars)
Remove inversed after (bars)
Lookback (bars), Nearest per side (N)
Right Extension Bars, Max FVGs, Meter width (bars)
Colours: Bullish, Bearish, Inversed fill
Suggested defaults (per TF)
15m: Extension 50, Max 12, Inversion window 8, Clean up 8, Meter width 20
H1: Extension 25, Max 10, Inversion window 6, Clean up 6, Meter width 15
H4: Extension 15, Max 8, Inversion window 5, Clean up 5, Meter width 10
Notes & edge cases
If a wick hits 50% or the far edge but state doesn’t change, you’re likely on close mode—switch to high/low for wick-based behaviour.
If a gap disappears, it likely met a clean up condition (50% removal, inversion window, inversion clean up, nearest-per-side, lookback, or max-cap).
Meters are hidden after ACTIVE to avoid stale percentages.
CEO_IndicatorCEO Indicator
Liquidity Levels:
PDH / PDL (Previous Day High/Low)
PWH / PWL (Previous Week High/Low)
PMH / PML (Previous Month High/Low)
DO, NYM, WO, TWO, MO (Daily/Weekly/Monthly Opens + True Opens)
Asia Midpoint (0.5) — midline between Asian session high and low
Customization: colors, opacity, line thickness
Trading Sessions:
4H Display: On the 4H timeframe and above, session boxes may appear cluttered or overlapping.
You can disable session display for higher timeframes to keep the chart clean.
Overlap: When Overlap is turned off, sessions will not be drawn on top of each
other — improving visual clarity during overlapping markets (e.g. London + New York).
Supports: Asia, Frankfurt, London, New York, Lunch
Display modes: Box, Streamlined, Fill, High-Low zones
Customized labels
Time zone auto-adjust & custom time zones
Fractals & FVG:
Automatic fractal high/low detection
Displays Fair Value Gaps (FVG) — bullish & bearish
Buying/Selling PressureBuying/Selling Pressure - Volume-Based Market Sentiment 
Buying/Selling Pressure identifies market dominance by separating volume into buying and selling components. The indicator uses Volume ATR normalization to create a universal pressure oscillator that works consistently across all markets and timeframes.
 What is Buying/Selling Pressure? 
This indicator answers a fundamental question: Are buyers or sellers in control? By analyzing how volume distributes within each bar, it calculates cumulative buying and selling pressure, then normalizes the result using Volume ATR for cross-market comparability.
 Formula:    × 100
Where Delta = Buying Volume - Selling Volume
 Calculation Methods 
 Money Flow (Recommended): 
Volume weighted by close position in bar range. Close near high = buying pressure, close near low = selling pressure.
Formula:   / (high - low)
 Simple Delta: 
Basic approach where bullish bars = 100% buying, bearish bars = 100% selling.
 Weighted Delta: 
Volume weighted by body size relative to total range, focusing on candle strength.
 Key Features 
 
 Volume ATR Normalization:  Adapts to volume volatility for consistent readings across assets
 Cumulative Delta:  Tracks net buying/selling pressure over time (similar to OBV)
 Signal Line:  EMA smoothing for trend identification and crossover signals
 Zero Line:  Clear visual separation between buyer and seller dominance
 Color-Coded Display:  Green area = buyers control, red area = sellers control
 
 Interpretation 
 Above Zero:  Buyers dominating - cumulative buying pressure exceeds selling
 Below Zero:  Sellers dominating - cumulative selling pressure exceeds buying
 Cross Signal Line:  Momentum shift - pressure trend changing direction
 Increasing Magnitude:  Strengthening pressure in current direction
 Decreasing Magnitude:  Weakening pressure, potential reversal
 Volume vs Pressure 
High volume with low pressure indicates balanced battle between buyers and sellers. High pressure with high volume confirms strong directional conviction. This separation provides insights beyond traditional volume analysis.
 Best Practices 
 
 Use with price action for confirmation
 Divergences signal potential reversals (price makes new high/low but pressure doesn't)
 Large volume with near-zero pressure = indecision, breakout preparation
 Signal line crossovers provide momentum change signals
 Extreme readings suggest potential exhaustion
 
 Settings 
 
 Calculation Method:  Choose Money Flow, Simple Delta, or Weighted Delta
 EMA Length:  Period for cumulative delta smoothing (default: 21)
 Signal Line:  Optional EMA of oscillator for crossover signals (default: 9)
 
Buying/Selling Pressure transforms volume analysis into actionable market sentiment, revealing whether buyers or sellers control price action beneath surface volatility.
 This indicator is designed for educational and analytical purposes. Past performance does not guarantee future results. Always conduct thorough research and consider consulting with financial professionals before making investment decisions. 
Historical Matrix Analyzer [PhenLabs]📊Historical Matrix Analyzer  
 Version:  PineScriptv6
 📌Description 
The Historical Matrix Analyzer is an advanced probabilistic trading tool that transforms technical analysis into a data-driven decision support system. By creating a comprehensive 56-cell matrix that tracks every combination of RSI states and multi-indicator conditions, this indicator reveals which market patterns have historically led to profitable outcomes and which have not.
At its core, the indicator continuously monitors seven distinct RSI states (ranging from Extreme Oversold to Extreme Overbought) and eight unique indicator combinations (MACD direction, volume levels, and price momentum). For each of these 56 possible market states, the system calculates average forward returns, win rates, and occurrence counts based on your configurable lookback period. The result is a color-coded probability matrix that shows you exactly where you stand in the historical performance landscape.
The standout feature is the Current State Panel, which provides instant clarity on your active market conditions. This panel displays signal strength classifications (from Strong Bullish to Strong Bearish), the average return percentage for similar past occurrences, an estimated win rate using Bayesian smoothing to prevent small-sample distortions, and a confidence level indicator that warns you when insufficient data exists for reliable conclusions.
 🚀Points of Innovation 
 
 Multi-dimensional state classification combining 7 RSI levels with 8 indicator combinations for 56 unique trackable market conditions
 Bayesian win rate estimation with adjustable smoothing strength to provide stable probability estimates even with limited historical samples
 Real-time active cell highlighting with “NOW” marker that visually connects current market conditions to their historical performance data
 Configurable color intensity sensitivity allowing traders to adjust heat-map responsiveness from conservative to aggressive visual feedback
 Dual-panel display system separating the comprehensive statistics matrix from an easy-to-read current state summary panel
 Intelligent confidence scoring that automatically warns traders when occurrence counts fall below reliable thresholds
 
 🔧Core Components 
 
 RSI State Classification:  Segments RSI readings into 7 distinct zones (Extreme Oversold <20, Oversold 20-30, Weak 30-40, Neutral 40-60, Strong 60-70, Overbought 70-80, Extreme Overbought >80) to capture momentum extremes and transitions
 Multi-Indicator Condition Tracking:  Simultaneously monitors MACD crossover status (bullish/bearish), volume relative to moving average (high/low), and price direction (rising/falling) creating 8 binary-encoded combinations
 Historical Data Storage Arrays:  Maintains rolling lookback windows storing RSI states, indicator states, prices, and bar indices for precise forward-return calculations
 Forward Performance Calculator:  Measures price changes over configurable forward bar periods (1-20 bars) from each historical state, accumulating total returns and win counts per matrix cell
 Bayesian Smoothing Engine:  Applies statistical prior assumptions (default 50% win rate) weighted by user-defined strength parameter to stabilize estimated win rates when sample sizes are small
 Dynamic Color Mapping System:  Converts average returns into color-coded heat map with intensity adjusted by sensitivity parameter and transparency modified by confidence levels
 
 🔥Key Features 
 
 56-Cell Probability Matrix:  Comprehensive grid displaying every possible combination of RSI state and indicator condition, with each cell showing average return percentage, estimated win rate, and occurrence count for complete statistical visibility
 Current State Info Panel:  Dedicated display showing your exact position in the matrix with signal strength emoji indicators, numerical statistics, and color-coded confidence warnings for immediate situational awareness
 Customizable Lookback Period:  Adjustable historical window from 50 to 500 bars allowing traders to focus on recent market behavior or capture longer-term pattern stability across different market cycles
 Configurable Forward Performance Window:  Select target holding periods from 1 to 20 bars ahead to align probability calculations with your trading timeframe, whether day trading or swing trading
 Visual Heat Mapping:  Color-coded cells transition from red (bearish historical performance) through gray (neutral) to green (bullish performance) with intensity reflecting statistical significance and occurrence frequency
 Intelligent Data Filtering:  Minimum occurrence threshold (1-10) removes unreliable patterns with insufficient historical samples, displaying gray warning colors for low-confidence cells
 Flexible Layout Options:  Independent positioning of statistics matrix and info panel to any screen corner, accommodating different chart layouts and personal preferences
 Tooltip Details:  Hover over any matrix cell to see full RSI label, complete indicator status description, precise average return, estimated win rate, and total occurrence count
 
 🎨Visualization 
 
 Statistics Matrix Table:  A 9-column by 8-row grid with RSI states labeling vertical axis and indicator combinations on horizontal axis, using compact abbreviations (XOverS, OverB, MACD↑, Vol↓, P↑) for space efficiency
 Active Cell Indicator:  The current market state cell displays “⦿ NOW ⦿” in yellow text with enhanced color saturation to immediately draw attention to relevant historical performance
 Signal Strength Visualization:  Info panel uses emoji indicators (🔥 Strong Bullish, ✅ Bullish, ↗️ Weak Bullish, ➖ Neutral, ↘️ Weak Bearish, ⛔ Bearish, ❄️ Strong Bearish, ⚠️ Insufficient Data) for rapid interpretation
 Histogram Plot:  Below the price chart, a green/red histogram displays the current cell’s average return percentage, providing a time-series view of how historical performance changes as market conditions evolve
 Color Intensity Scaling:  Cell background transparency and saturation dynamically adjust based on both the magnitude of average returns and the occurrence count, ensuring visual emphasis on reliable patterns
 Confidence Level Display:  Info panel bottom row shows “High Confidence” (green), “Medium Confidence” (orange), or “Low Confidence” (red) based on occurrence counts relative to minimum threshold multipliers
 
 📖Usage Guidelines 
 RSI Period 
 
 Default: 14
 Range: 1 to unlimited
 Description: Controls the lookback period for RSI momentum calculation. Standard 14-period provides widely-recognized overbought/oversold levels. Decrease for faster, more sensitive RSI reactions suitable for scalping. Increase (21, 28) for smoother, longer-term momentum assessment in swing trading. Changes affect how quickly the indicator moves between the 7 RSI state classifications.
 
 MACD Fast Length 
 
 Default: 12
 Range: 1 to unlimited
 Description: Sets the faster exponential moving average for MACD calculation. Standard 12-period setting works well for daily charts and captures short-term momentum shifts. Decreasing creates more responsive MACD crossovers but increases false signals. Increasing smooths out noise but delays signal generation, affecting the bullish/bearish indicator state classification.
 
 MACD Slow Length 
 
 Default: 26
 Range: 1 to unlimited
 Description: Defines the slower exponential moving average for MACD calculation. Traditional 26-period setting balances trend identification with responsiveness. Must be greater than Fast Length. Wider spread between fast and slow increases MACD sensitivity to trend changes, impacting the frequency of indicator state transitions in the matrix.
 
 MACD Signal Length 
 
 Default: 9
 Range: 1 to unlimited
 Description: Smoothing period for the MACD signal line that triggers bullish/bearish state changes. Standard 9-period provides reliable crossover signals. Shorter values create more frequent state changes and earlier signals but with more whipsaws. Longer values produce more confirmed, stable signals but with increased lag in detecting momentum shifts.
 
 Volume MA Period 
 
 Default: 20
 Range: 1 to unlimited
 Description: Lookback period for volume moving average used to classify volume as “high” or “low” in indicator state combinations. 20-period default captures typical monthly trading patterns. Shorter periods (10-15) make volume classification more reactive to recent spikes. Longer periods (30-50) require more sustained volume changes to trigger state classification shifts.
 
 Statistics Lookback Period 
 
 Default: 200
 Range: 50 to 500
 Description: Number of historical bars used to calculate matrix statistics. 200 bars provides substantial data for reliable patterns while remaining responsive to regime changes. Lower values (50-100) emphasize recent market behavior and adapt quickly but may produce volatile statistics. Higher values (300-500) capture long-term patterns with stable statistics but slower adaptation to changing market dynamics.
 
 Forward Performance Bars 
 
 Default: 5
 Range: 1 to 20
 Description: Number of bars ahead used to calculate forward returns from each historical state occurrence. 5-bar default suits intraday to short-term swing trading (5 hours on hourly charts, 1 week on daily charts). Lower values (1-3) target short-term momentum trades. Higher values (10-20) align with position trading and longer-term pattern exploitation.
 
 Color Intensity Sensitivity 
 
 Default: 2.0
 Range: 0.5 to 5.0, step 0.5
 Description: Amplifies or dampens the color intensity response to average return magnitudes in the matrix heat map. 2.0 default provides balanced visual emphasis. Lower values (0.5-1.0) create subtle coloring requiring larger returns for full saturation, useful for volatile instruments. Higher values (3.0-5.0) produce vivid colors from smaller returns, highlighting subtle edges in range-bound markets.
 
 Minimum Occurrences for Coloring 
 
 Default: 3
 Range: 1 to 10
 Description: Required minimum sample size before applying color-coded performance to matrix cells. Cells with fewer occurrences display gray “insufficient data” warning. 3-occurrence default filters out rare patterns. Lower threshold (1-2) shows more data but includes unreliable single-event statistics. Higher thresholds (5-10) ensure only well-established patterns receive visual emphasis.
 
 Table Position 
 
 Default: top_right
 Options: top_left, top_right, bottom_left, bottom_right
 Description: Screen location for the 56-cell statistics matrix table. Position to avoid overlapping critical price action or other indicators on your chart. Consider chart orientation and candlestick density when selecting optimal placement.
 
 Show Current State Panel 
 
 Default: true
 Options: true, false
 Description: Toggle visibility of the dedicated current state information panel. When enabled, displays signal strength, RSI value, indicator status, average return, estimated win rate, and confidence level for active market conditions. Disable to declutter charts when only the matrix table is needed.
 
 Info Panel Position 
 
 Default: bottom_left
 Options: top_left, top_right, bottom_left, bottom_right
 Description: Screen location for the current state information panel (when enabled). Position independently from statistics matrix to optimize chart real estate. Typically placed opposite the matrix table for balanced visual layout.
 
 Win Rate Smoothing Strength 
 
 Default: 5
 Range: 1 to 20
 Description: Controls Bayesian prior weighting for estimated win rate calculations. Acts as virtual sample size assuming 50% win rate baseline. Default 5 provides moderate smoothing preventing extreme win rate estimates from small samples. Lower values (1-3) reduce smoothing effect, allowing win rates to reflect raw data more directly. Higher values (10-20) increase conservatism, pulling win rate estimates toward 50% until substantial evidence accumulates.
 
 ✅Best Use Cases 
 
 Pattern-based discretionary trading where you want historical confirmation before entering setups that “look good” based on current technical alignment
 Swing trading with holding periods matching your forward performance bar setting, using high-confidence bullish cells as entry filters
 Risk assessment and position sizing, allocating larger size to trades originating from cells with strong positive average returns and high estimated win rates
 Market regime identification by observing which RSI states and indicator combinations are currently producing the most reliable historical patterns
 Backtesting validation by comparing your manual strategy signals against the historical performance of the corresponding matrix cells
 Educational tool for developing intuition about which technical condition combinations have actually worked versus those that feel right but lack historical evidence
 
 ⚠️Limitations 
 
 Historical patterns do not guarantee future performance, especially during unprecedented market events or regime changes not represented in the lookback period
 Small sample sizes (low occurrence counts) produce unreliable statistics despite Bayesian smoothing, requiring caution when acting on low-confidence cells
 Matrix statistics lag behind rapidly changing market conditions, as the lookback period must accumulate new state occurrences before updating performance data
 Forward return calculations use fixed bar periods that may not align with actual trade exit timing, support/resistance levels, or volatility-adjusted profit targets
 
 💡What Makes This Unique 
 
 Multi-Dimensional State Space:  Unlike single-indicator tools, simultaneously tracks 56 distinct market condition combinations providing granular pattern resolution unavailable in traditional technical analysis
 Bayesian Statistical Rigor:  Implements proper probabilistic smoothing to prevent overconfidence from limited data, a critical feature missing from most pattern recognition tools
 Real-Time Contextual Feedback:  The “NOW” marker and dedicated info panel instantly connect current market conditions to their historical performance profile, eliminating guesswork
 Transparent Occurrence Counts:  Displays sample sizes directly in each cell, allowing traders to judge statistical reliability themselves rather than hiding data quality issues
 Fully Customizable Analysis Window:  Complete control over lookback depth and forward return horizons lets traders align the tool precisely with their trading timeframe and strategy requirements
 
 🔬How It Works 
 1. State Classification and Encoding 
 
 Each bar’s RSI value is evaluated and assigned to one of 7 discrete states based on threshold levels (0: <20, 1: 20-30, 2: 30-40, 3: 40-60, 4: 60-70, 5: 70-80, 6: >80)
 Simultaneously, three binary conditions are evaluated: MACD line position relative to signal line, current volume relative to its moving average, and current close relative to previous close
 These three binary conditions are combined into a single indicator state integer (0-7) using binary encoding, creating 8 possible indicator combinations
 The RSI state and indicator state are stored together, defining one of 56 possible market condition cells in the matrix
 
 2. Historical Data Accumulation 
 
 As each bar completes, the current state classification, closing price, and bar index are stored in rolling arrays maintained at the size specified by the lookback period
 When the arrays reach capacity, the oldest data point is removed and the newest added, creating a sliding historical window
 This continuous process builds a comprehensive database of past market conditions and their subsequent price movements
 
 3. Forward Return Calculation and Statistics Update 
 
 On each bar, the indicator looks back through the stored historical data to find bars where sufficient forward bars exist to measure outcomes
 For each historical occurrence, the price change from that bar to the bar N periods ahead (where N is the forward performance bars setting) is calculated as a percentage return
 This percentage return is added to the cumulative return total for the specific matrix cell corresponding to that historical bar’s state classification
 Occurrence counts are incremented, and wins are tallied for positive returns, building comprehensive statistics for each of the 56 cells
 The Bayesian smoothing formula combines these raw statistics with prior assumptions (neutral 50% win rate) weighted by the smoothing strength parameter to produce estimated win rates that remain stable even with small samples
 
 💡Note: 
The Historical Matrix Analyzer is designed as a decision support tool, not a standalone trading system. Best results come from using it to validate discretionary trade ideas or filter systematic strategy signals. Always combine matrix insights with proper risk management, position sizing rules, and awareness of broader market context. The estimated win rate feature uses Bayesian statistics specifically to prevent false confidence from limited data, but no amount of smoothing can create reliable predictions from fundamentally insufficient sample sizes. Focus on high-confidence cells (green-colored confidence indicators) with occurrence counts well above your minimum threshold for the most actionable insights.
Niv Deal + Previ D W M + OPR + Asian🧭 Indicator Description (English)
Name: Niveaux Dealers + Previous D/W/M Auto + OPR + Asian Session
Platform: TradingView (Pine Script v6)
Type: Multi-module visual indicator for market structure and session ranges
🧩 Overview
This indicator combines three complementary modules to help traders visualize key market levels, opening ranges, and session dynamics — all in one comprehensive tool.
It is designed primarily for index and futures trading (e.g. NQ, ES, DAX), but can be applied to any market or timeframe.
MODULE 1 — Dealers Levels + Previous High/Low (Auto)
This first module automatically extracts and plots custom Dealer Levels and Previous Period Levels.
It can parse manually entered price levels (from a single text input) such as daily max/min, control levels, put supports, and call resistances — then draw horizontal lines and labels on the chart.
Features:
One text input for all dealer levels (easy copy-paste format).
Automatic parsing of prices from text (ignores irrelevant characters).
Groups of levels:
Maxima (Max 1D / Event / Extreme)
Minima (Min 1D / Event / Extreme)
Buyer/Seller Controls
Put Supports and Call Resistances
Independent color, style, and width for each line.
Transparent rectangular labels positioned perfectly on the levels.
Previous Daily, Weekly, and Monthly High/Low levels added automatically.
Optional summary table showing all levels and values in real time.
MODULE 2 — OPR (Opening Price Range)
The second module highlights the Opening Price Range, defined by the first 15 minutes (or any chosen period) of the trading session.
Features:
Fully configurable start and end time (local chart timezone).
Displays:
High, Low, and Midline (median)
Optional rectangle between high/low
Optional labels on each line
Independent color, line style, and thickness.
Works perfectly with non-standard sessions (e.g. 13:30–22:00 UTC for U.S. futures).
Uses local chart time instead of exchange time for intuitive control.
MODULE 3 — Asian Session Range
The third module draws the Asian trading session range, automatically detecting price action between configurable hours (default 17:00 → 01:00).
Features:
Adjustable start and end time (supports overnight sessions).
Plots Asian High, Asian Low, and Asian Middle (mid-range line).
Highlights the Asian box area with semi-transparent color.
Optional labels at the end of each level.
Fully synchronized with the chart’s local timezone (same logic as OPR).
Simple toggle to enable or disable the entire Asian module.
⚙️ Customization & Display
Each module can be toggled independently.
Colors, line styles (solid, dashed, dotted), and thickness are customizable.
Label visibility and extensions (left/right) can be adjusted.
The indicator is lightweight and optimized for real-time performance.
💡 Use Case
Traders can use this multi-module setup to:
Identify dealer reaction zones and institutional levels.
Track previous highs/lows for potential liquidity sweeps.
Monitor session ranges (Opening and Asian) for volatility shifts.
Combine all three perspectives (Dealer, Session, Historical) into one unified view.
Would you like me to rewrite this description in TradingView publication form
HTF Control Shift + Prev Candle Break Sequence 🧭 HTF Control Shift + Previous Candle Break Sequence
Overview
The HTF Control Shift + Previous Candle Break Sequence indicator identifies high-probability shift candles that suggest a potential change in market control — from sellers to buyers or vice versa — and then tracks whether price confirms that shift by breaking the previous candle’s high or low.
This tool is designed to help traders detect institutional control shifts and confirm them with price structure breaks, providing a framework for spotting early trend reversals or strong continuation moves.
How It Works
Control Shift Candle Detection
A Bullish Control Shift occurs when a candle shows:
A long lower wick (≥ Wick % Threshold of total range).
A close near the high (within Body % Threshold of the top).
A Bearish Control Shift occurs when a candle shows:
A long upper wick (≥ Wick % Threshold of total range).
A close near the low (within Body % Threshold of the bottom).
These candles are highlighted in green (bullish) or red (bearish), and optionally labeled on the chart.
Previous Candle High/Low Tracking
The script automatically plots horizontal lines at the previous candle’s high (green) and low (red).
These act as key reference levels for breakout confirmation.
Breakout Confirmation Sequence
A Bullish Sequence triggers when a Bullish Control Shift candle is followed by a break above the previous candle’s high.
A Bearish Sequence triggers when a Bearish Control Shift candle is followed by a break below the previous candle’s low.
When either sequence completes, the indicator can send a TradingView alert confirming the directional breakout.
How to Use
Timeframe:
Optimized for higher timeframes (1H, 4H, Daily) to filter out intraday noise and identify structural market shifts.
Trend Reversal Identification:
Watch for Control Shift candles at major highs/lows, order blocks, or liquidity zones — a confirmed breakout often signals a trend reversal or new directional push.
Continuation Confirmation:
In trending markets, a Control Shift candle that breaks in the direction of trend can validate a strong continuation setup.
Alert Usage:
Set alerts for:
Bullish Control Shift Confirmed Breakout
Bearish Control Shift Confirmed Breakdown
Optional: raw Control Shift or Break alerts.
Customization
Wick % Threshold: Adjusts the required wick size to define a control shift.
Body % Threshold: Controls how close the close must be to the high/low for confirmation.
Label Toggle: Optionally display labels only on control shift candles.
Best Practices
Combine with higher-timeframe trend filters.
Avoid using it alone in tight consolidation zones.
Strongest signals occur when:
Control Shift appears at key structure levels.
The breakout bar closes firmly beyond the previous high/low.
Volume supports the breakout.
Summary
✅ Detects when market control flips (buyers ↔ sellers).
✅ Confirms shift with breakout above/below previous candle.
✅ Ideal for 1H–4H swing or position trading.
✅ Provides visual, structural, and alert-based confirmation.
GRG/RGR Signal, MA, Ranges and PivotsThis indicator is a combination of several indicators. 
It is a combination of two of my indicators which I solely use for trading
 1. EMA 10-20-50-200, Pivots and Previous Day/Week/Month range 
 2. 3/4-Bar GRG / RGR Pattern (Conditional 4th Candle) 
You can use them individually if you already have some of them or just use this one. Belive me when I say, this is all you need, along with market structure knowlege and even if you don’t have that, this indicator has been doing wonders for me. This is all I use. I do not use anything else.
 **Note  - Do checkout the indicators individually as I have added valuable information in the comment section.
It contains the following,
 1. 10 EMA/SMA - configurable
2. 20 EMA/SMA - configurable
3. 50 EMA/SMA - configurable
4. 200 EMA/SMA - configurable
5. Previous Day's Range - configurable
6. Previous Week's Range - configurable 
7. Previous Month's Range - configurable 
8. Pivots - configurable 
9. Buy Sell Signal - configurable  
 The Moving Averages 
It is a very important combination and using it correctly with price action will strengthen your entries and exits.
The ema's or sma's added are the most powerful ones and they do definitely act as support and resistance.
 The Daily/Weekly/Monthly Ranges 
The Daily/Weekly/Monthly ranges are extremely important for any trader and should be used for targets and reversals.
 Pivots 
Pivots can provide support and resistance level. R5 and S5 can be used to check for over stretched conditions. You can customise them however you like. It is a full pivot indicator. 
It is defaulted to show R5 and S5 only to reduce noise in the chart but it can be customised. 
 The 3/4 RGR or GRG Signal Generator  
Combined with a 3/4 RGR or GRG setup can be all a trader needs.
You don't need complex strategies and SMC concepts to trade. Simple EMAs, ranges and RGR/GRG setup is the most winning combination.
This indicator can be used to identify the Green-Red-Green or Red-Green-Red pattern.
It is a price action indicator where a price action which identifies the defeat of buyers and sellers.
If the buyers comprehensively defeat the sellers then the price moves up and if the sellers defeat the buyers then the price moves down.
In my trading experience this is what defines the price movement.
It is a 3 or 4 candle pattern, beyond that i.e, 5 or more candles could mean a very sideways market and unnecessary signal generation.
 How does it work? 
 Upside/Green signal 
1. Say candle 1 is Green, which means buyers stepped in, then candle 2 is Red or a Doji, that means sellers brought the price down. Then if candle 3 is forming to be Green and breaks the closing of the 1st candle and opening of the 2nd candle, then a green arrow will appear and that is the place where you want to take your trade.
2. Here the buyers defeated the sellers.
3. Sometimes candle 3 falls short but candle 4 breaks candle 1's closing and candle 2's opening price. We can enter on candle 4.
4. Important - We need to enter the trade as soon as the price moves above the candle 1 and 2's body and should not wait for the 3rd or 4th candle to close. Ignore wicks.
5. But for a more optimised entry I have added an option to use candle’s highs and lows instead of open and close. This reduces lot of noise and provides us with more precise entry. This setting is turned on by default.
6. I have restricted it to 4 candles and that is all that is needed. More than that is a longer sideways market.
7. I call it the +-+ or GRG pattern or Green-Red-Green or Buyer-Seller-Buyer or Seller defeated or just Buyer pattern.
8. Stop loss can be candle 2's mid for safe traders (that includes me) or candle 2's body low for risky traders.
9. Back testing suggests that body low will be useless and result in more points in loss because for the bigger move this point will not be touched, so why not get out faster.
 Downside/Red signal 
1. Say candle 1 is Red, which means sellers stepped in, then candle 2 is Green or a Doji, that means buyers took the price up. Then if candle 3 is forming to be Red and breaks the closing of the 1st candle and opening of the 2nd candle then a Red arrow will appear and that is the place where you want to take your trade.
2. Sometimes candle 3 falls short but candle 4 breaks candle 1's closing and candle 2's opening price. We can enter on candle 4.
3. We need to enter the trade as soon as the price moves below the candle 1 and 2's body and should not wait for the 3rd or 4th candle to close.
4. But for a more optimised entry I have added an option to use candle’s highs and lows instead of open and close. This reduces lot of noise and provides us with more precise entry. This setting is turned on by default.
5. I have restricted it to 4 candles and that is all that is needed. More than that is a longer sideways market.
6. I call it the -+- or RGR pattern or Red-Green-Red or Seller-Buyer-Seller or Buyer defeated or just Seller pattern.
7. Stop loss can be candle 2's mid for safe traders ( that includes me) or candle 2's body high for risky traders.
8. Back testing suggests that body high will be useless and result in more points in loss because for the bigger move this point will not be touched, so why not get out faster.
 Combining Indicators and Signal 
Combining these indicators with GRG/RGR signal can be very powerful and can provide big moves.
1.  MA crossover and Signal -  This is very powerful and provides a very big move. Trades can be held for longer. If after taking the trade we notice that the MA crossover has happened then trades can be held for higher targets.
2.  Pivots and Signal -  Pivots and add a support or resistance point. Take profits on these points. R5/S5 are over streched conditions so we can start looking for reversal signals and ignore other signals
3.  Intraday Range -  first 1, 5, 15 min of the day - Sideways days is when price will stay in these ranges. You can take profits at these ranges or if the range is broken and we get a signal, then it can mean that the direction will be sustained.
4.   Previous Day/Week/Month Ranges -  These can be used as Take Profit points if the price is moving towards them after getting the signal. If the range is broken and we get a signal then it can be a strong signal. They can also be used as reversal points if a strong signal is generated.
 Important Settings 
1. Include 4th Candle Confirmation - You can enable or disable the 4th candle signal to avoid the noise, but at times I have noticed that the 4th candle gives a very strong signal or I can say that the strong signal falls on the 4th candle. This is mostly a coincidence.
2. Bars to check (default 10) - You can also configure how many previous bars should the signal be generated for. 10 to 30 is good enough. To backtest increase it to 2000 or 5000 for example.
3. Use Candle High/Low for confirmation instead of Candle Open/Close - More optimized entry and noise reduction. This option is now defaulted to false.
4. Show Green-Red-Green (bull) signals - Show only bull entries. Useful when I have a predefined view i.e, I know market is going to go up today.
5. Show Red-Green-Red (bear) signals - Show only bear entries. Useful when I have a predefined view i.e, I know market is going to go down today.
6. 3rd candle should be a Strong candle before considering 4th candle - This will enforce additional logic in 4 candle setup that the 3rd candle is the candle in our direction of breakout. This means something like GRGG is mandatory, which is still the default behaviour. If disabled, the 3rd candle can be any candle and 4th candle will act as our breakout candle. This behaviour has led to breakouts and breakdowns as times, hence I added this as a separate feature. Vice-versa for a RGGR.
	For a 4 candle setup till now we were expecting GRGG or RGRR but we can let the system ignore the 3rd candle completely if needed.
	This will result in additional signals.
7. Three intraday ranges added for index and stock traders - 1 min, 5 min and 15 min ranges will be displayed. These are disabled by default except 15 min. These are very important ranges and in sideways days the price will usually move within the 15 min. A breakout of this range and a positive signal can be a very powerful setup.
	Safe traders can avoid taking a trade in this range as it can lead to fakeouts.
	The line style, width, color and opacity are configurable.
 Pointers/Golden Rules 
1. If after taking the trade, the next candle moves in your direction and closes strong bullish or bearish, then move SL to break even and after that you can trail it.
2. If a upside trade hits SL and immediately a down side trade signal is generated on the next candle then take it. Vice versa is true.
3. Trades need to be taken on previous 2 candle's body high or low combined and not the wicks.
4. The most losses a trader takes is on a sideways day and because in our strategy the stop loss is so small that even on a sideways day we'll get out with a little profit or worst break even.
5. Hold trades for longer targets and don't panic.
6. If last 3-4 days have been sideways then there is a good probability that today will be trending so we can hold our trade for longer targets. Inverse is true when the market has been trending for 2-3 days then volatility followed by sideways is coming (DOW theory). Target to hold the trade for whole day and not exit till the day closes.
7. In general avoid trading in the middle of the day for index and stocks. Divide the day into 3 parts and avoid the middle.
8. Use Support/Resistance, 10, 20, 50, 200 EMA/SMA, Gaps, Whole/Round numbers(very imp) for identifying targets.
9. Trail your SL.
10. For indexes I would use 5 min and 15 min timeframe and at times 10 mins.
11. For commodities and crypto we can use higher timeframe as well. Look for signals during volatile time durations and avoid trading the whole day. Signal usually gives good targets on those times.
12. If a GRG or RGR pattern appears on a daily timeframe then this is our time to go big.
13. Minimum Risk to Reward should be 1:2 and for longer targets can be 1:4 to 1:10.
14. Trade with small lot size. Money management will happen automatically.
15. With small lot size and correct Risk-Reward we can be very profitable. Don't trade with big lot size.
16. Stay in the market for longer and collect points not money.
17. Very imp - Watch market and learn to generate a market view.
18. Very imp - Only 3 type of candles are needed in trading - 
Strong Bullish (Big Green candle), Strong Bearish (Big Red candle), 
Hammer (it is Strong Bullish), Inverse Hammer (it is Strong Bearish) 
and Doji (indecision or confusion). 
If on daily timeframe I see Strong Bullish candle previous day then I am biased to the upside the next day, if I see Strong Bearish candle the previous day then I am biased to the downside the next day, if I see Doji on the previous day then I am cautious the next day, if there are back to back Dojis forming in daily or weekly then I am preparing for big move so time to go big once I get the signal.
19. Most Important Candlestick pattern - Bullish and Bearish Engulfing
20. The only Chart patterns I need - 
a) Falling Wedge/Channel Bullish Pattern Uptrend or Bull Flag - Buying - Forming over a couple days for intraday and forming over a couple of weeks for swing 
b) Falling Wedge/Channel  Bullish Pattern Downtrend or Falling Channel - Buying
c) Rising Wedge Bearish Pattern Uptrend or Rising Channel - Selling
d) Rising Wedge Bearish Pattern Downtrend or Bear flag - Selling
e) Head and Shoulder - Over a longer period not for intraday. In 15 min takes few days and for swing 1hr or 4h or daily can take few days
f) M and W pattern - Reversal Patterns - They form within the above 4 patterns, usually resulting in the break of trend line
21. How Gaps work - 
a) Small Gap up in Uptrend - Market can fill the gap and reverse. The perception is that people are buying. If previous day candle was Strong Bullish then market view is up.
b) Big Gap up in Uptrend - Not news driven - Profit booking will come but may not fill the entire gap
c) Big Gap up in Uptrend - News driven, war related, tax, interest rate - Market can keep going up without stopping.
c) Flat opening in Uptrend - Big chance of market going up. If previous day candle was Strong Bullish then view is upwards, if it was Doji then still upwards.
d) Gap down in Uptrend - Market is surprised. After going down initially it can go up
e) Small Gap down in Downtrend - Market can fill the gap and keep moving down. If previous day candle was Strong Bearish then view is still down.
f) Flat opening in Downtrend - View is down, short today.
g) Big Gap down in Downtrend - Profit booking and foolish buying will come but market view is still down.
h) Gap down with News - Volatility, sideways then down. 
i) Gap Up in Downtrend - Can move up - Price can move up during 2/3rd of the day and End of the day revert and close in red.
22. Go big on bearish days for option traders. Puts are better bought and Calls are better sold.
23. Cluster of green signals can lead to bigger move on the upside and vice versa for red signals.
24. Most of this is what I learned from successful traders (from the top 2%) only the indicator is mine.
Kalman Filter [DCAUT]█ Kalman Filter  
📊 ORIGINALITY & INNOVATION
The Kalman Filter represents an important adaptation of aerospace signal processing technology to financial market analysis. Originally developed by Rudolf E. Kalman in 1960 for navigation and guidance systems, this implementation brings the algorithm's noise reduction capabilities to price trend analysis.
This implementation addresses a common challenge in technical analysis: the trade-off between smoothness and responsiveness. Traditional moving averages must choose between being smooth (with increased lag) or responsive (with increased noise). The Kalman Filter improves upon this limitation through its recursive estimation approach, which continuously balances historical trend information with current price data based on configurable noise parameters.
The key advancement lies in the algorithm's adaptive weighting mechanism. Rather than applying fixed weights to historical data like conventional moving averages, the Kalman Filter dynamically adjusts its trust between the predicted trend and observed prices. This allows it to provide smoother signals during stable periods while maintaining responsiveness during genuine trend changes, helping to reduce whipsaws in ranging markets while not missing significant price movements.
📐 MATHEMATICAL FOUNDATION
The Kalman Filter operates through a two-phase recursive process:
 Prediction Phase: 
The algorithm first predicts the next state based on the previous estimate:
 
 State Prediction: Estimates the next value based on current trend
 Error Covariance Prediction: Calculates uncertainty in the prediction
 
 Update Phase: 
Then updates the prediction based on new price observations:
 
 Kalman Gain Calculation: Determines the weight given to new measurements
 State Update: Combines prediction with observation based on calculated gain
 Error Covariance Update: Adjusts uncertainty estimate for next iteration
 
 Core Parameters: 
 
 Process Noise (Q): Represents uncertainty in the trend model itself. Higher values indicate the trend can change more rapidly, making the filter more responsive to price changes.
 Measurement Noise (R): Represents uncertainty in price observations. Higher values indicate less trust in individual price points, resulting in smoother output.
 
 Kalman Gain Formula: 
The Kalman Gain determines how much weight to give new observations versus predictions:
K = P(k|k-1) / (P(k|k-1) + R)
Where:
 
 K is the Kalman Gain (0 to 1)
 P(k|k-1) is the predicted error covariance
 R is the measurement noise parameter
 
When K approaches 1, the filter trusts new measurements more (responsive).
When K approaches 0, the filter trusts its prediction more (smooth).
This dynamic adjustment mechanism allows the filter to adapt to changing market conditions automatically, providing an advantage over fixed-weight moving averages.
📊 COMPREHENSIVE SIGNAL ANALYSIS
 Visual Trend Indication: 
The Kalman Filter line provides color-coded trend information:
 
 Green Line: Indicates the filter value is rising, suggesting upward price momentum
 Red Line: Indicates the filter value is falling, suggesting downward price momentum
 Gray Line: Indicates sideways movement with no clear directional bias
 
 Crossover Signals: 
Price-filter crossovers generate trading signals:
 
 Golden Cross: Price crosses above the Kalman Filter line, suggests potential bullish momentum development, may indicate a favorable environment for long positions, filter will naturally turn green as it adapts to price moving higher
 Death Cross: Price crosses below the Kalman Filter line, suggests potential bearish momentum development, may indicate consideration for position reduction or shorts, filter will naturally turn red as it adapts to price moving lower
 
 Trend Confirmation: 
The filter serves as a dynamic trend baseline:
 
 Price Consistently Above Filter: Confirms established uptrend
 Price Consistently Below Filter: Confirms established downtrend
 Frequent Crossovers: Suggests ranging or choppy market conditions
 
 Signal Reliability Factors: 
Signal quality varies based on market conditions:
 
 Higher reliability in trending markets with sustained directional moves
 Lower reliability in choppy, range-bound conditions with frequent reversals
 Parameter adjustment can help adapt to different market volatility levels
 
🎯 STRATEGIC APPLICATIONS
 Trend Following Strategy: 
Use the Kalman Filter as a dynamic trend baseline:
 
 Enter long positions when price crosses above the filter
 Enter short positions when price crosses below the filter
 Exit when price crosses back through the filter in the opposite direction
 Monitor filter slope (color) for trend strength confirmation
 
 Dynamic Support/Resistance: 
The filter can act as a moving support or resistance level:
 
 In uptrends: Filter often provides dynamic support for pullbacks
 In downtrends: Filter often provides dynamic resistance for bounces
 Price rejections from the filter can offer entry opportunities in trend direction
 Filter breaches may signal potential trend reversals
 
 Multi-Timeframe Analysis: 
Combine Kalman Filters across different timeframes:
 
 Higher timeframe filter identifies primary trend direction
 Lower timeframe filter provides precise entry and exit timing
 Trade only in direction of higher timeframe trend for better probability
 Use lower timeframe crossovers for position entry/exit within major trend
 
 Volatility-Adjusted Configuration: 
Adapt parameters to match market conditions:
 
 Low Volatility Markets (Forex majors, stable stocks): Use lower process noise for stability, use lower measurement noise for sensitivity
 Medium Volatility Markets (Most equities): Process noise default (0.05) provides balanced performance, measurement noise default (1.0) for general-purpose filtering
 High Volatility Markets (Cryptocurrencies, volatile stocks): Use higher process noise for responsiveness, use higher measurement noise for noise reduction
 
 Risk Management Integration: 
 
 Use filter as a trailing stop-loss level in trending markets
 Tighten stops when price moves significantly away from filter (overextension)
 Wider stops in early trend formation when filter is just establishing direction
 Consider position sizing based on distance between price and filter
 
📋 DETAILED PARAMETER CONFIGURATION
 Source Selection: 
Determines which price data feeds the algorithm:
 
 OHLC4 (default): Uses average of open, high, low, close for balanced representation
 Close: Focuses purely on closing prices for end-of-period analysis
 HL2: Uses midpoint of high and low for range-based analysis
 HLC3: Typical price, gives more weight to closing price
 HLCC4: Weighted close price, emphasizes closing values
 
 Process Noise (Q) - Adaptation Speed Control: 
This parameter controls how quickly the filter adapts to changes:
Technical Meaning:
 
 Represents uncertainty in the underlying trend model
 Higher values allow the estimated trend to change more rapidly
 Lower values assume the trend is more stable and slow-changing
 
Practical Impact:
 
 Lower Values: Produces very smooth output with minimal noise, slower to respond to genuine trend changes, best for long-term trend identification, reduces false signals in choppy markets
 Medium Values: Balanced responsiveness and smoothness, suitable for swing trading applications, default (0.05) works well for most markets
 Higher Values: More responsive to price changes, may produce more false signals in ranging markets, better for short-term trading and day trading, captures trend changes earlier, adjust freely based on market characteristics
 
 Measurement Noise (R) - Smoothing Control: 
This parameter controls how much the filter trusts individual price observations:
Technical Meaning:
 
 Represents uncertainty in price measurements
 Higher values indicate less trust in individual price points
 Lower values make each price observation more influential
 
Practical Impact:
 
 Lower Values: More reactive to each price change, less smoothing with more noise in output, may produce choppy signals
 Medium Values: Balanced smoothing and responsiveness, default (1.0) provides general-purpose filtering
 Higher Values: Heavy smoothing for very noisy markets, reduces whipsaws significantly but increases lag in trend change detection, best for cryptocurrency and highly volatile assets, can use larger values for extreme smoothing
 
 Parameter Interaction: 
The ratio between Process Noise and Measurement Noise determines overall behavior:
 
 High Q / Low R: Very responsive, minimal smoothing
 Low Q / High R: Very smooth, maximum lag reduction
 Balanced Q and R: Middle ground for most applications
 
 Optimization Guidelines: 
 
 Start with default values (Q=0.05, R=1.0)
 If too many false signals: Increase R or decrease Q
 If missing trend changes: Decrease R or increase Q
 Test across different market conditions before live use
 Consider different settings for different timeframes
 
📈 PERFORMANCE ANALYSIS & COMPETITIVE ADVANTAGES
 Comparison with Traditional Moving Averages: 
Versus Simple Moving Average (SMA):
 
 The Kalman Filter typically responds faster to genuine trend changes
 Produces smoother output than SMA of comparable length
 Better noise reduction in ranging markets
 More configurable for different market conditions
 
Versus Exponential Moving Average (EMA):
 
 Similar responsiveness but with better noise filtering
 Less prone to whipsaws in choppy conditions
 More adaptable through dual parameter control (Q and R)
 Can be tuned to match or exceed EMA responsiveness while maintaining smoothness
 
Versus Hull Moving Average (HMA):
 
 Different noise reduction approach (recursive estimation vs. weighted calculation)
 Kalman Filter offers more intuitive parameter adjustment
 Both reduce lag effectively, but through different mechanisms
 Kalman Filter may handle sudden volatility changes more gracefully
 
 Response Characteristics: 
 
 Lag Time: Moderate and configurable through parameter adjustment
 Noise Reduction: Good to excellent, particularly in volatile conditions
 Trend Detection: Effective across multiple timeframes
 False Signal Rate: Typically lower than simple moving averages in ranging markets
 Computational Efficiency: Efficient recursive calculation suitable for real-time use
 
 Optimal Use Cases: 
 
 Markets with mixed trending and ranging periods
 Assets with moderate to high volatility requiring noise filtering
 Multi-timeframe analysis requiring consistent methodology
 Systematic trading strategies needing reliable trend identification
 Situations requiring balance between responsiveness and smoothness
 
 Known Limitations: 
 
 Parameters require adjustment for different market volatility levels
 May still produce false signals during extreme choppy conditions
 No single parameter set works optimally for all market conditions
 Requires complementary indicators for comprehensive analysis
 Historical performance characteristics may not persist in changing market conditions
 
 USAGE NOTES 
This indicator is designed for technical analysis and educational purposes. The Kalman Filter's effectiveness varies with market conditions, tending to perform better in markets with clear trending phases interrupted by consolidation. Like all technical indicators, it has limitations and should not be used as the sole basis for trading decisions, but rather as part of a comprehensive trading approach.
Algorithm performance varies with market conditions, and past characteristics do not guarantee future results. Always test thoroughly with different parameter settings across various market conditions before using in live trading. No technical indicator can predict future price movements with certainty, and all trading involves risk of loss.
KCP Support & Resistance [Dr.K.C.PRAKASH]ChatGPT said:
This indicator “KCP Support & Resistance  ” (Pine Script v5) is a multi-featured support & resistance tool that combines pivots, slope-based channels, Fibonacci options, and SMA200 trend reference.
🔎 Core Concept
The script identifies pivot highs and lows and uses them to draw support and resistance levels on the chart.
It allows you to visualize them in two ways:
Horizontal lines (flat support/resistance at pivot values).
Parallel slope-based lines (trend-adjusted, drawn with slope factor).
⚙️ Settings & Options
Theme
useDark: Switches to a dark-color palette with bright neon-style lines for better visibility on dark charts.
Basic Settings
length: Pivot length (bars used to detect swing high/low).
lookback: How many past pivot points to use for plotting lines.
Slope: Multiplier applied to slope calculations (for slanted trendline-style S/R).
Extend Horizontal Lines Left?: Option to extend horizontal lines to both sides.
Extend Parallel Lines Left?: Same for slope-based lines.
Show/Hide Controls
Show Parallel Lines?: Toggle diagonal support/resistance.
Show Horizontal Lines?: Toggle flat levels.
Show SMA 200 Line?: Toggle long-term SMA(200) reference.
Hide Fibonacci Lines? / Show Fib Trend Line? / Show All Fibonacci Lines?: (reserved for Fib functionality).
Line Colors
Customizable line colors for parallel & horizontal high/low lines.
If Dark Theme is enabled → Uses preset colors:
Electric Blue (Resistance - Parallel Highs)
Neon Green (Support - Parallel Lows)
Deep Red/Pink (Horizontal Highs)
Warm Yellow (Horizontal Lows)
📐 Logic & Calculations
Pivot Detection
Uses ta.pivothigh & ta.pivotlow with length to mark swing points.
Stores them in arrays for drawing multiple levels.
Slope Calculation
Uses covariance/variance of price vs. time (bar_index) to estimate slope.
Multiplied by Slope factor.
Makes trend-following parallel support/resistance lines possible.
Line Drawing
Parallel lines: Slanted, based on pivot highs/lows + slope.
Horizontal lines: Flat support & resistance levels extended across the chart.
SMA200 Plot
Plots SMA(200) for long-term trend direction.
Colored white if EMA(200) > SMA(200), else yellow (trend bias visual).
📊 What You See on Chart
Support & Resistance drawn dynamically from pivots.
Choice of horizontal (classic S/R) or sloped (trend-following) lines.
Dark theme colors → Electric blue, neon green, deep pink, warm yellow (if enabled).
SMA200 reference line → Helps identify bullish/bearish long-term bias.
Optional Fibonacci lines (future expansion).
VWAP / ORB / VP & POCThis is an all-in-one technical analysis tool designed to give you a comprehensive view of the market on a single chart. It combines three powerful indicators—VWAP, Opening Range, and Volume Profile—to help you identify key price levels, understand intraday trends, and spot areas of high liquidity.
 What It Does 
The indicator plots three distinct components on your chart:
 
 Volume-Weighted Average Price (VWAP): A benchmark that shows the average price a security has traded at throughout the day, based on both price and volume. It's often used by institutional traders to gauge whether they are getting a good price. The script also plots standard deviation or percentage-based bands around the VWAP line, which can act as dynamic support and resistance.
 Opening Range Breakout (ORB): A tool that highlights the high and low of the initial trading period of a session (e.g., the first 15 minutes). The script draws lines for the opening price, range high, and range low for the rest of the session. It also colors the chart with zones to visually separate price action above, below, and within this critical opening range.
 Volume Profile (VP): A powerful study that shows trading activity over a set number of bars at specific price levels. Unlike traditional volume that is plotted over time, this is plotted on the price axis. It helps you instantly see where the most and least trading has occurred, identifying significant levels like the Point of Control (POC)—the single price with the most volume—and the Value Area (VA), where the majority of trading took place.
 
 How to Use It for Trading 
 
 The real strength of this indicator comes from finding confluence, where two or more of its components signal the same key level.
 Identifying Support & Resistance: The POC, VWAP bands, Opening Range high/low, and session open price are all powerful levels to watch. When price approaches one of these levels, you can anticipate a potential reaction (a bounce or a breakout).
 Gauging Intraday Trend: A simple rule of thumb is to consider the intraday trend bullish when the price is trading above the VWAP and bearish when it is trading below the VWAP.
 Finding High-Value Zones: The Volume Profile’s Value Area (VA) shows you where the market has accepted a price. Trading within the VA is considered "fair value," while prices outside of it are "unfair." Reversals often happen when the price tries to re-enter the Value Area from the outside.
 
 Settings: 
Here’s a breakdown of all the settings you can change to customize the indicator to your liking.
 Volume Profile Settings:  
 
 Number of Bars: How many of the most recent bars to use for the calculation. A higher number gives a broader profile.
 Row Size: The number of price levels (rows) in the profile. Higher numbers give a more detailed, granular view.
 Value Area Volume %: The percentage of total volume to include in the Value Area (standard is 70%).
 Horizontal Offset: Moves the Volume Profile further to the right to avoid overlapping with recent price action.
 Colors & Styles: Customize the colors for the POC line, Value Area, and the up/down volume bars.
 
 VWAP Settings:  
 
 Anchor Period: Resets the VWAP calculation at the start of a new Session, Week, Month, Year, etc. You can even anchor it to corporate events like Earnings or Splits.
 Source: The price source used in the calculation (default is hlc3, the average of the high, low, and close).
 Bands Calculation Mode:
 Standard Deviation: The bands are based on statistical volatility.
 Percentage: The bands are a fixed percentage away from the VWAP line.
 Bands Multiplier: Sets the distance of the bands from the VWAP. You can enable and configure up to three sets of bands.
 
 ORB Settings (Opening Range) 
 
 Opening Range Timeframe: The duration of the opening range (e.g., 15 for 15 minutes, 60 for the first hour).
 Market Session & Time Zone: Crucial for ensuring the range is calculated at the correct time for the asset you're trading.
 Line & Zone Styles: Full customization for the colors, thickness, and style (Solid, Dashed, Dotted) of the High, Low, and Opening Price lines, as well as the background colors for the zones above, below, and within the range.
Breaout and followthroughThis indicator is designed to identify and highlight a single, powerful entry signal at the beginning of a new trend. It filters for high-volatility breakout bars that show strong directional conviction, helping traders catch the initial momentum of a potential move. It will only paint one bullish or bearish signal after a trend change is detected, preventing repeat signals during a sustained move.
Core Concept
The indicator combines four key concepts to generate high-probability signals:
Trend Direction: It first establishes the overall trend (bullish or bearish) using a configurable Exponential or Simple Moving Average (EMA/SMA).
Volatility Expansion: It looks for bars with a larger-than-average range by comparing the bar's size to the Average True Range (ATR). This helps identify moments of increased market interest.
Closing Strength (IBS): It uses the Internal Bar Strength (IBS) to measure directional conviction. A high IBS (closing near the top) suggests bullish strength, while a low IBS (closing near the bottom) suggests bearish pressure.
Breakout Confirmation: As an optional but powerful filter, it can confirm the signal by ensuring the bar is breaking above the high or below the low of a user-defined number of previous bars.
A signal is only generated on the first bar that meets all these criteria after the price crosses the trend-defining moving average, making it ideal for capturing the start of a new swing.
Features
Bullish Signals (Green): Highlights the first bar in an uptrend that is larger than the ATR, closes with a high IBS (>70), and optionally breaks out above the recent highs.
Bearish Signals (Red): Highlights the first bar in a downtrend that is larger than the ATR, closes with a low IBS (<30), and optionally breaks out below the recent lows.
"First Signal Only" Logic: The script is hard-coded to show only the initial signal in a new trend, filtering out noise and redundant signals.
Fully Customizable Trend Filter:
Choose between EMA or SMA for trend definition.
Set the MA length (default is a short-term 7-period MA).
Option to show or hide the moving average on the chart.
Optional Breakout Filter:
Enable or disable the requirement for the signal bar to break the high/low of previous bars.
Customize the lookback period for the breakout confirmation.
How to Use
This indicator can be used as a primary signal for a trend-following or momentum-based trading system.
Look for a Green Bar (Bullish Signal): This suggests the start of a potential uptrend. Consider it a signal for a long entry. A logical stop-loss could be placed below the low of the highlighted signal bar.
Look for a Red Bar (Bearish Signal): This suggests the start of a potential downtrend. Consider it a signal for a short entry. A logical stop-loss could be placed above the high of the highlighted signal bar.
Adjust Settings: Use the settings menu to configure the indicator to your preferred market and timeframe. A longer Trend MA Length will result in fewer, more long-term signals, while a shorter length will be more responsive.
As with any tool, this indicator is best used in conjunction with other forms of analysis, such as market structure, support/resistance levels, and proper risk management.
Daily/Weekly Wick (Shadow) Range📈 Detailed Guide to the Daily/Weekly Wick (Shadow) Range Indicator
This indicator is a powerful visualization tool designed to map the key price levels established during the previous trading period (either the previous day or the previous week). Instead of just showing a single line for the high and low, it highlights the entire range of the upper and lower wicks (shadows), representing the "battleground" where buyers and sellers were most active.
How It Works
The Wick (Shadow) Range indicator fetches the Open, High, Low, and Close data from the last completed daily or weekly candle and projects those levels onto your current chart. This creates two distinct colored zones.
Upper Wick (Green Zone): This area spans from the Previous High down to the top of the Previous Candle's Body. It visually represents the territory where sellers successfully pushed the price down from its peak. This entire zone can be considered a resistance area.
Lower Wick (Red Zone): This area spans from the bottom of the Previous Candle's Body down to the Previous Low. It shows where buyers stepped in to defend a price level and push it back up. This entire zone can be considered a support area.
How to Use It in Your Trading
This indicator isn't meant to give direct buy or sell signals on its own. Instead, it provides crucial context about market structure. Here are several ways to incorporate it into your strategy:
1. Identifying Key Support & Resistance
This is the indicator's primary function. The most significant levels are:
Key Resistance: The top edge of the green zone (the previous period's high).
Key Support: The bottom edge of the red zone (the previous period's low).
Look for the current price to react when it approaches these boundaries. These are high-probability areas for price to pause or reverse.
2. Watching for Price Rejection (Reversal Trading)
The colored zones are perfect for spotting rejection signals.
Bearish Rejection 📉: If the current price enters the green zone but fails to stay there, closing back below it (often forming a new wick), it's a strong sign that sellers are still in control at that level. This can be an excellent entry signal for a short position.
Bullish Rejection 📈: If the current price dips into the red zone and is quickly bought back up, it shows that buyers are actively defending that area. This can be a great entry signal for a long position.
3. Confirming Breakouts (Trend Trading)
The zones also help validate breakouts.
Bullish Breakout: If the price pushes decisively through the entire green zone and closes above the previous high, it signals that the previous resistance has been broken and the trend may continue upward.
Bearish Breakdown: If the price falls decisively through the entire red zone and closes below the previous low, it confirms that support has failed and the price may continue downward.
4. Setting Context with Timeframes
Weekly Setting: Use the "Weekly" option to identify major, significant support and resistance levels that can influence the market for the entire week. These are powerful levels for swing trading.
Daily Setting: Use the "Daily" option for intraday trading. The previous day's high and low are critical pivot points that many day traders watch.
⚙️ Indicator Settings
The indicator has one simple setting, which you can access by clicking the gear icon ⚙️ next to its name on the chart.
Select Wick Timeframe: This dropdown menu allows you to switch the indicator's calculation between the Daily and Weekly timeframe instantly.
Higher High Lower Low Higher High Lower Low 🦉{Phanchai} — TradingView Description 
 Structure detector with dynamic Support/Resistance, customizable labels, and ready-made alerts (Pine v6). 
 
This script marks market structure turning points —  HH  (Higher High),  HL  (Higher Low),  LH  (Lower High),  LL  (Lower Low) — and builds segmented Support/Resistance lines from those turns. Labels and colors are fully customizable and the script ships with multiple alert conditions.
 
 What it does 
 
 Detects swing pivots using left/right bar windows, then classifies each confirmed swing as HH/HL/LH/LL.
 Plots compact labels at the confirmed pivot bars with tooltips (English).
 Derives dynamic  Support / Resistance : every time structure flips, the previous level is closed and a new segment starts,  extending to the right .
 Provides alert conditions for any label and for specific first-occurrence shifts (e.g., first HH after a bearish label).
 
 How it works (in short) 
 
 A pivot high/low confirms only after  Right Bars  candles have closed; labels and S/R appear at that confirmation bar.
 An internal backbone (zigzag-like) is built from confirmed pivots, with light consistency checks to avoid contradictory sequences.
 Structure rules compare the recent five pivots (A…E) to decide HH/HL/LH/LL.
 S/R is updated from structure: e.g., in an up leg, new HLs refresh Support; in a down leg, new LHs refresh Resistance.
 
 Alerts included 
 
 Any structure label (HH/HL/LH/LL)  — Fires on any new label.
 First LL after HL/HH  — First bearish break after a bullish label.
 First HH after LL/LH  — First bullish break after a bearish label.
 LL or HL formed  — Any low-side label.
 LH or HH formed  — Any high-side label.
 HL formed 
 HH formed 
 LL formed 
 LH formed 
 
 How to use (quick start) 
 
 Add the indicator to your chart.
 Choose  Left/Right Bars  for your timeframe (e.g., 5–10 for intraday; larger for higher timeframes).
 Pick your label colors/sizes and S/R style.
 Right-click the chart →  Add alert…  → Condition: this indicator → select the desired alert.
 
 Notes & tips 
 
 Because pivots require  Right Bars  to confirm, labels and S/R appear with a natural delay of that many bars. This avoids repainting.
 Raising  Left/Right Bars  reduces noise and increases the average distance between pivots; lowering them increases sensitivity.
 Structure is strict: sometimes you may see two HL (or two LH) in a row if the intermediate opposite swing didn’t qualify as HH/LH (or LL/HL).
 S/R segments are drawn with  line objects ; they are controlled via Inputs (style/width/color), not the Style tab.
 This tool highlights structure; it’s not a standalone entry/exit system. Combine with volume, trend, or risk management rules.
 
 Built with Pine v6. Clean, compact labels; segmented S/R that updates only on confirmed changes; comprehensive alerts ready for automation.
RSI Divergence + Hidden RSI Divergence + Hidden (TV-like pairing, final)
What it does
This indicator plots RSI and automatically detects both regular and hidden divergences by pairing RSI pivots with price pivots. It supports a TradingView-like loose pairing (within a user-defined bar tolerance) and a strict same-bar pairing. Detected signals are drawn with lines and optional labels on the RSI pane for quick visual verification.
Divergence logic
Regular Bullish (label: Bull)
Price makes a lower low while RSI makes a higher low → potential upward reversal.
Regular Bearish (label: Bear)
Price makes a higher high while RSI makes a lower high → potential downward reversal.
Hidden Bullish (label: H_Bull)
Price makes a higher low while RSI makes a lower low → trend-continuation bias upward.
Hidden Bearish (label: H_Bear)
Price makes a lower high while RSI makes a higher high → trend-continuation bias downward.
All conditions use pivot-to-pivot comparisons with optional equality tolerance for price and RSI to reduce false “equal” mismatches.
Pairing modes
TV-like
Pairs the latest price and RSI pivots if their pivot bars occur within ±tolBars.
A lightweight “pending” buffer allows pairing a newly detected pivot with a recent opposite pivot that arrived a few bars earlier/later (within tolerance).
Same Bar
Price and RSI pivots must occur on the exact same bar to form a pair.
Key inputs
RSI Source & Length: srcRsi, rsiLen (default 14). RSI line and reference levels (70/50/30) can be shown/hidden.
Pivot Window: leftBars, rightBars for both price and RSI pivots.
Pairing: pairMode = TV-like or Same Bar; tolBars for bar tolerance (TV-like only).
Price Pivot Basis: priceMode = High/Low (default) or Close.
Equality Tolerance:
allowEqual (use >=/<=),
priceEpsTks (ticks) for price equality slack,
rsiEps (points) for RSI equality slack.
Visibility: showRSI, showRegular, showHidden, showLabels.
Visuals
Lines (on RSI):
Regular Bearish: red
Regular Bullish: lime
Hidden Bearish: orange
Hidden Bullish: teal
Labels (optional): "Bear", "Bull", "H_Bear", "H_Bull" placed on the RSI series at the second pivot.
Alerts
Four alert conditions are provided and fire when the corresponding divergence is confirmed:
Bear (Regular)
Bull (Regular)
H_Bear (Hidden)
H_Bull (Hidden)
Notes & tips
Divergences are evaluated only when both price and RSI pivots exist and can be paired under the selected mode.
Pivot sensitivity: smaller leftBars/rightBars → earlier but noisier signals; larger values → fewer, more stable pivots.
Tolerance: If you miss valid setups because pivots land a few bars apart, use TV-like with a small tolBars (e.g., 1–2). If you prefer stricter confirmation, use Same Bar.
Equality slack: Use priceEpsTks and rsiEps to avoid rejecting near-equal highs/lows due to tiny differences.
Works on any symbol/timeframe; as with all divergence tools, treat signals as context—combine with trend, structure, and risk management.
RSI Pivots with Divergence Overlay█ OVERVIEW
The RSI Pivots with Divergence Overlay indicator is an advanced tool based on RSI, displaying dynamic bands on the price chart to simplify the identification of overbought and oversold conditions. Pivot points and divergences between them are derived from these bands, providing a comprehensive view of the market and enabling the creation of various trading strategies based on this single indicator.
█ CONCEPTS
Areas where RSI exits the bands are often reversal points in the market. The concept of this indicator is to highlight places where the probability of a trend reversal increases. Therefore, pivots and divergences have been added to better identify these key moments. Additionally, the bands allow viewing the market context in relation to the RSI indicator, facilitating analysis of momentum and volatility.
█ KEY FEATURES
Dynamic Bands and RSI Signals: The bands are calculated based on the closing price and RSI value, with dynamic scaling adjusted to market volatility. The upper band corresponds to overbought levels, the lower to oversold, and the midline is their average. The price level relative to the bands serves as a visual RSI signal, indicating potential overbought or oversold conditions.
Pivot Points: The indicator identifies local price highs and lows in relation to RSI levels. The pivot level is taken from the high/low of the candle. A high pivot is detected when the high of the candle reaches a local maximum after crossing the upper RSI level (overbought), signaling a potential reversal. A low pivot appears after a local price minimum following a drop below the lower RSI level (oversold), indicating a possible uptrend reversal. The pivot length (default 2 bars) defines the search range for these extremes, meaning that with a length of 2, a potential divergence signal will appear with a 2-candle delay, as this is the minimum time required to confirm a local pivot. Pivot lines are drawn on the chart, and labels display the RSI value (from the close of the candle) and price at the detection moment. Pivot lines disappear after the detection of the next low pivot for lower lines and high pivot for upper lines, but unbreached lines or those with high volume may still serve as support or resistance levels.
Divergence Detection: The indicator automatically detects divergences to predict trend changes. Bearish divergence occurs when the price forms a higher high pivot, but the RSI (from the close of the candle) is lower than in the previous pivot, indicating weakening upward momentum and a potential bearish reversal. Bullish divergence appears when the price forms a lower low pivot, but the RSI is higher, suggesting building momentum and a possible bullish reversal. Divergences are marked in pivot labels (e.g., "Bear Div" or "Bull Div") and supported by alerts upon detection.
Return Signals: The indicator generates buy and sell signals based on RSI (price) returning to the bands after extreme conditions, independently of pivots and divergences. A buy signal is triggered when RSI (price) crosses above the lower level (exiting oversold), suggesting a potential price rise toward the midline or upper band. A sell signal occurs when RSI (price) falls below the upper level (exiting overbought), indicating a possible price drop toward the lower band. Signals are visualized as arrows (up/down triangles) on the chart, with customizable colors.
█ CONFIGURATION
The indicator offers extensive customization options:
RSI Length (rsiLength): Sets the number of periods used to calculate RSI (default 14).
RSI Upper Level (rsiUpper): Defines the overbought threshold (default 70).
RSI Lower Level (rsiLower): Defines the oversold threshold (default 30).
Band Scaling (scale): Determines the scaling multiplier for bands based on market volatility (default 15.0).
SMA Length for Candle Midpoint (length): Number of periods for calculating the moving average of candle midpoints (default 200). This parameter is used to smooth price data, enabling more accurate volatility assessment and band width adjustment to market dynamics.
Pivot Length (pivotLength): Sets the range (in bars) for detecting local price extremes (default 2).
Pivot Label Offset (pivotLabelOffset): Multiplier for the candle range to position pivot labels (default 0.3).
Show Bands (showBands): Enables/disables the display of bands on the chart.
Show Fill (showFill): Enables/disables the fill between bands and the midline.
Show Pivot Lines (showPivotLines): Enables/disables pivot lines on the chart.
Show Pivot Labels (showPivotLabels): Enables/disables labels with RSI and price values at pivots.
Show Return Signals (showReturnSignals): Enables/disables the display of buy and sell signals.
Colors and Style: Customizable colors for bands, fills, pivot lines, labels, and line widths (default 1).
█ USAGE
The indicator performs best when combined with other technical analysis tools, such as Fibonacci levels, moving averages, or trendlines, to confirm pivot, divergence, and return signals. It enables traders to identify key reversal points, detect hidden trend weaknesses through divergences, and confirm trade entries with return signals.
Usage Examples:
Price bounces off a previous pivot with high volume – this increases the probability of a trend change or correction.
A similar situation when RSI is outside the bands strengthens the signal.
If divergence occurs in addition, we have further confirmation.
This can be combined with Fibonacci levels to check if Fibo zones overlap with pivot lines – this may increase the chance of a strong price reaction.
█ ALERTS
The indicator supports alerts for:
Buy and sell signals (RSI returning to bands).
Detection of bearish and bullish divergences.
Volume 2.0Volume with standard deviations.
Helps to identify moderately high/low volume and very high/low volume.
Low volume indicates less market participation. High volume indicates higher market participation.
It forecasts potential changes of sentiment.
Volume with standard deviations (n=14).
Helps to identify moderately high/low volume and very high/low volume. Low volume indicates less market participation. High volume indicates higher market participation.
It forecasts potential changes of sentiment. This indicator has to be used with others. It is an adjunct tool, but a powerful one.
NB:
My previous version "Volume" violated the Pine Code house rules, so it got shielded from public view. This is my first experience with writing in Pine Code and publishing. I suspect it was because I didn't publish with a clean chart without other indicators added. My apologies in advance if version 2.0 is again another violation, which will then get shielded again. I am only publishing out of good will to share that's all.
Algo + Trendlines :: Medium PeriodThis indicator helps me to avoid overlooking Trendlines / Algolines. So far it doesn't search explicitly for Algolines (I don't consider volume at all), but it's definitely now already not horribly bad.
These are meant to be used on logarithmic charts btw! The lines would be displayed wrong on linear charts.
The biggest challenge is that there are some technical restrictions in TradingView, f. e. a script stops executing if a for-loop would take longer than 0.5 sec.
So in order to circumvent this and still be able to consider as many candles from the past as possible, I've created multiple versions for different purposes that I use like this:
 
   Algo + Trendlines :: Medium Period : This script looks for "temporary highs / lows" (meaning the bar before and after has lower highs / lows) on the daily chart, connects them and shows the 5 ones that are the closest to the current price (=most relevant). This one is good to find trendlines more thoroughly, but only up to 4 years ago.
   Algo + Trendlines :: Long Period : This version looks instead at the weekly charts for "temporary highs / lows" and finds out which days caused these highs / lows and connects them, Taking data from the weekly chart means fewer data points to check whether a trendline is broken, which allows to detect trendlines from up to 12 years ago! Therefore it misses some trendlines. Personally I prefer this one with "Only Confirmed" set to true to really show only the most relevant lines. This means at least 3 candle highs / lows touched the line. These are more likely stronger resistance / support lines compared to those that have been touched only twice.
 
 Very important:  sometimes you might see dotted lines that suddenly stop after a few months (after 100 bars to be precise). This indicates you need to zoom further out for TradingView to be able to load the full line. Unfortunately TradingView doesn't render lines if the starting point was too long ago, so this is my workaround. This is also the script's biggest advantage: showing you lines that you might have missed otherwise since the starting bars were outside of the screen, and required you to scroll f. e back to 2015..
One more thing to know:
 
  Weak colored line = only 2 "collision" points with candle highs/lows (= not confirmed)
  Usual colored line = 3+ "collision" points (= confirmed)
 
Make sure to move this indicator above the ticker in the Object Tree, so that it is drawn on top of the ticker's candles!
More infos:  www.reddit.com
Algo + Trendlines :: Long PeriodThis indicator helps me to avoid overlooking Trendlines / Algolines. So far it doesn't search explicitly for Algolines (I don't consider volume at all), but it's definitely now already not horribly bad.
These are meant to be used on logarithmic charts btw! The lines would be displayed wrong on linear charts.
The biggest challenge is that there are some technical restrictions in TradingView, f. e. a script stops executing if a for-loop would take longer than 0.5 sec.
So in order to circumvent this and still be able to consider as many candles from the past as possible, I've created multiple versions for different purposes that I use like this:
 
   Algo + Trendlines :: Medium Period : This script looks for "temporary highs / lows" (meaning the bar before and after has lower highs / lows) on the daily chart, connects them and shows the 5 ones that are the closest to the current price (=most relevant). This one is good to find trendlines more thoroughly, but only up to 4 years ago.
   Algo + Trendlines :: Long Period : This version looks instead at the weekly charts for "temporary highs / lows" and finds out which days caused these highs / lows and connects them, Taking data from the weekly chart means fewer data points to check whether a trendline is broken, which allows to detect trendlines from up to 12 years ago! Therefore it misses some trendlines. Personally I prefer this one with "Only Confirmed" set to true to really show only the most relevant lines. This means at least 3 candle highs / lows touched the line. These are more likely stronger resistance / support lines compared to those that have been touched only twice.
 
 Very important:  sometimes you might see dotted lines that suddenly stop after a few months (after 100 bars to be precise). This indicates you need to zoom further out for TradingView to be able to load the full line. Unfortunately TradingView doesn't render lines if the starting point was too long ago, so this is my workaround. This is also the script's biggest advantage: showing you lines that you might have missed otherwise since the starting bars were outside of the screen, and required you to scroll f. e back to 2015..
One more thing to know:
 
  Weak colored line = only 2 "collision" points with candle highs/lows (= not confirmed)
  Usual colored line = 3+ "collision" points (= confirmed)
 
Make sure to move this indicator above the ticker in the Object Tree, so that it is drawn on top of the ticker's candles!
More infos:  www.reddit.com






















